clearset more offset mem 40m#delimit ;log using "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/figure_1", replace text;use "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/data_IO";generate ln_dpi_hlio=log(dpi_hlio+1);/* MODEL 1 */;heckman r_moodys chga_demo currentacctlag gdpcapgrowthlag res_gdplag inflatwdi1 l_trade_gdp resourcelag default, select (rated_2= chga_demo currentacctlag gdpcapgrowthlag res_gdplag inflatwdi1 l_trade_gdp resourcelag default flow1 d1960-d2000) vce(robust) cluster(ccode) mills(lambda);predict ycond, ycond; predict probseen, psel;label var probseen "Predicted Probability of Securing Rating";kdensity probseen if chga_demo==1, gaussian addplot(kdensity probseen if chga_demo==0, gaussian lc(red) lp(dash))lc(blue) lpattern(solid)legend (label(1 "Democracy") label(2 "Autocracy") col(2) position(6));graph save "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/figure1.gph", replace;graph export "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/figure1.png", as(png) replace;log c; 